﻿using System;
using System.Collections.Generic;
using System.Data.Entity;
using System.Linq;
using System.Web;

namespace Source
{
    public class DbSchema : DbContext
    {
        public DbSchema(string connectionString = "Data Source=.\\SQLEXPRESS;Initial Catalog=Source;Integrated Security=SSPI;")
            : base(connectionString)
        {
        }

        public DbSet<Profile> Profiles
        {
            get;
            set;
        }

        public DbSet<Team> Teams
        {
            get;
            set;
        }

        public DbSet<ProfileTeam> ProfilesTeams
        {
            get;
            set;
        }

        public DbSet<Competitor> Competitors
        {
            get;
            set;
        }

        protected override void OnModelCreating(DbModelBuilder modelBuilder)
        {
            base.OnModelCreating(modelBuilder);
        }

        public override int SaveChanges()
        {
            return base.SaveChanges();
        }
    }
}